"""
1、使用while，完成以下图形的输出
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
"""
# num = int(input("请输入要生成的行数："))
# i = 1
# while i <= num:
#     if i <= num - i:
#         j = i
#         while j > 0:
#             print("*",end = "")
#             j -= 1
#         print("\n")
#     else:
#         ｊ = num - i + 1
#         while ｊ > 0:
#             print("*", end='')
#             ｊ -= 1
#         print("\n")
#     i += 1
"""
2、eak和continue的区别：
答：break是跳出整个循环
    continue是跳出此次循环，进入下一轮次循环
"""
# num = 0
# sum = 0
# while num < 100:
#     num += 1
#     if num % 2 == 0:
#         sum += num
#     print(sum)
